<?php 
$sql = "select id as goodsid,taobao_id,title,pic_url,price,reserve_price,goods_link,remain from tttj.goods where nine_part=1 and dstatus=1 order by rand() limit 1;";
$goodsinfo = getonerecord($sql);

$content='<?php ';
$content .= "\$commendgoods = ". var_export($goodsinfo,true) . ";\r\n";
$content .= ' ?>';
file_put_contents(S_ROOT.'source/data/commend.php',$content);
?>